<!DOCTYPE html>
<html lang="ch">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
	<meta name="format-detection" content="telephone=no" />
	<script>
		var html = document.getElementsByTagName('html')[0];
		html.style.fontSize = html.clientWidth / 3.75 + "px";
	</script>
	<title>发布商品</title>
	<link rel="stylesheet" href="../static/css/Reset.css" />
	<link rel="stylesheet" href="../static/css/mobiscroll.2.13.2.css" />
	<link rel="stylesheet" href="../static/css/publish_goods.css" />
</head>
<body>
	<div class="container" id="publishGoods">
		<div id="content" v-cloak>
			<div class="sdd_productTitle" id="productTitle" v-cloak>
				<textarea id="TextArea1" name="BZ" rows="" placeholder="输入商品标题，描述商品特点，不超过30字">{{goodsDetails.goodsName}}</textarea>
				<span id="textCount" class='Max_msg'>0/30</span>
			</div>
			<div class="sdd_uploadImg">
				<ul class="sdd_upload" id="sdd_uploads">
					<li class="imgs" v-for="mainImg in mainImage">
						<img :src="mainImg" class="wyl_imgup">
						<span class="clearpic"><img src="../static/images/clearpic.png" alt=""/></span>
					</li>
				</ul>
				<div id="uploadMainImgBtn" class="uploadImgBtn">
					<p id="sdd_upload">添加主图</p>
				</div>
			</div>
			<p class="sdd_photo">用作封面和列表，让商品脱颖而出，不超过6张</p>
			<div class="sdd_proItem" id="goodsClass">
				<span class="sdd_proVir">商品分类</span>
				<input class="sdd_proCon" type="text" id="goodsClassName" value="{{goodsDetails.goodsClassName}}" readonly="readonly" placeholder="请选择商品分类" />
				<input type="hidden" id="goodsClassId" value="{{goodsDetails.goodsClassId}}" />
			</div>
			<div class="sdd_proItem" id="totalSupply_s">
				<span class="sdd_proVir">总供应量</span>
				<input class="sdd_proCon" type="text" id="_totalSupply" value="" readonly="readonly" placeholder="请输入总供应量" />
			</div>
			<div class="sdd_proItem" id="wholesale">
				<span class="sdd_proVir">批发价格</span>
				<input class="sdd_proCon" type="text" id="_beginPrice" value="" readonly="readonly" placeholder="请输入批发价格" />
			</div>
			<div class="sdd_proItem" id="target">
				<span class="sdd_proVir">供货时间</span>
				<vue-calendar :date.sync="time"></vue-calendar>
			</div>
			<div class="sdd_proItem" id="proDetails">
				<span class="sdd_proVir">图文详情</span>
				<span class="sdd_proCon" id="detailsText">未填写</span>
			</div>
			<div class="sdd_proItem bg0">
				<span class="sdd_proVir">运费</span>
				<span class="sdd_check"><input class="yunfei" type="radio" name="yunfei" value="1" />买家承担</span>
				<span class="sdd_check"><input class="yunfei" type="radio" name="yunfei" value="2" />卖家承担</span>
				<span class="sdd_check"><input class="yunfei" type="radio" name="yunfei" value="3" />协商</span>
			</div>
			<div class="h_50"></div>
			<div class="sdd_sub">
				<!--<span class="sdd_preview">预览</span>-->
				<span class="sdd_release" @click="publishGoods()">发布</span>
			</div>
		</div>
		<!--商品分类-->
		<section id="areaLayer" class="express-area-box">
			<header>
				<h3>选择产品种类</h3>
				<a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
			</header>
			<article id="classBox">
				<ul id="areaList" class="area-list">
					<li v-for="class in classData" :id="class.id" :data-id="class.lowest" @click="getChildClass($event)">{{class.name}}</li>
				</ul>
			</article>
		</section>
		<!--总供应量-->
		<section id="areaLayer1" class="express-area-box">
			<header>
				<h3>总供应量</h3>
				<a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
			</header>
			<div class="sdd_proItem">
				<span class="sdd_proVir">总量</span>
				<input type="tel" id="totalSupply" class="sdd_proCon" value="{{goodsDetails.totalSupply}}" placeholder="请输入供应总量" />
			</div>
			<div class="sdd_proItem" id="supplyUnite">
				<span class="sdd_proVir">单位</span>
				<select class="demo-test-select" data-role="none">
					<option v-for="unit in unitsData" value="{{$index}}">{{unit}}</option>
				</select>
			</div>
			<p class="sdd_save" id="wholesaleSave">保存</p>
		</section>
		<!--批发价格-->
		<section id="areaLayer2" class="express-area-box">
			<header>
				<h3>添加批发价格</h3>
				<a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
			</header>
			<div class="sdd_proItem">
				<span class="sdd_proVir">起批量</span>
				<input type="tel" id="rangeBegin" class="sdd_number unitTxt" value="{{goodsDetails.rangeBegin}}" placeholder="请输入起批量" />
			</div>
			<div class="sdd_proItem bg0">
				<span class="sdd_proVir">单价</span>
				<span class="sdd_proCon right0">元</span>
				<input type="number" id="price" class="sdd_proCon" value="{{goodsDetails.price}}" style="margin-right: .08rem;" placeholder=""/>
			</div>
			<!--<div class="sdd_proItem" id="priceUnite" style="display: none;">
				<span class="sdd_proVir">单位</span>
				<select class="demo-test-select" data-role="none">
					<option v-for="unit in unitsData" value="{{$index}}">{{unit}}</option>
				</select>
			</div>-->
			<p class="sdd_save" id="supplySave">保存</p>
		</section>
		<!--图文详情-->
		<section id="areaLayer3" class="express-area-box">
			<header>
				<h3>图文详情</h3>
				<a id="closeArea" class="close" href="javascript:void(0)" title="关闭"></a>
			</header>
			<div class="detailDiv">
				<p class="sdd_proDec">详情描述</p>
				<div class="sdd_proTitle" id="productDetail">
					<textarea id="TextArea2" name="BZ" rows="" placeholder="输入活动描述，不超过800字">{{goodsDetails.detailsDesc}}</textarea>
					<span id="textCount" class='Max_msg'>0/800</span>
				</div>
				<p class="sdd_photo bor0">详情图片(<i id="detailImgLen">0</i>/9)</p>
				<ul class="sdd_upload" id="sdd_upDetail">
					<li class="imgs" v-for="detailImg in detailsPics">
						<img :src="detailImg" class="wyl_imgup">
						<span class="clearpic"><img src="../static/images/clearpic.png" alt=""/></span>
					</li>
				</ul>
				<div id="uploadDetailImgBtn" class="uploadImgBtn">
					<p id="sdd_upload">添加主图</p>
				</div>
				<p class="sdd_save" id="detailsSave">保存</p>
			</div>
		</section>
	</div>
</body>
<script src="https://api.map.baidu.com/api?v=2.0&ak=1BiZDIdoRV9iryDNcdF4oU37pqwftOin&s=1"></script>
<script type="text/javascript" src="../libs/jquery.min.js"></script>
<script type="text/javascript" src="../libs/fastclick.min.js"></script>
<script type="text/javascript" src="../libs/vue/vue.min.js"></script>
<script type="text/javascript" src="../libs/vue/vue-resource.min.js"></script>
<script type="text/javascript" src="../libs/vue/vue-date.js"></script>
<script type="text/javascript" src="../libs/webuploader.html5only.js"></script>
<script type="text/javascript" src="../libs/require.js"></script>
<script type="text/javascript" src="../libs/var.js"></script>
<script type="text/javascript" src="../libs/common.js"></script>
<script type="text/javascript" src="./js/mainPicsUpload.js"></script>
<script type="text/javascript" src="./js/mobiscroll.2.13.2.js"></script>
<script type="text/javascript" src="./js/publish_goods.js"></script>
</html>